﻿using ByteSite.API.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;

namespace ByteSite.API.Controllers
{
    public class BooksController : ApiController
    {
        // GET: api/Books
        public ResponseMessage Get()
        {
            return new ResponseMessage {
                code=200,
                msg="",
                data = new string[] { "value1", "value2" }

            };
        }

        // GET: api/Books/5
        public ResponseMessage Get(int id)
        {
            return new ResponseMessage
            {
                code = 200,
                msg = "",
                data = "value"

            };
        }

        // POST: api/Books
        public void Post([FromBody]string value)
        {
            new ResponseMessage
            {
                code = 200,
                msg = "",
                data = value

            };
        }
    }
}
